:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --background-color: #ffffff;
    --text-color: #1d1d1f;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* 深色主题变量 */
[data-theme="dark"] {
    --background-color: #1a1a1a;
    --text-color: #ffffff;
    --primary-color: #64b5f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    height: 50px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 30px;
    width: auto;
}

.logo span {
    font-size: 1.1rem;
    font-weight: 500;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 1rem;
    font-weight: 400;
    font-size: 0.9rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* 轮播图样式 */
.carousel-section {
    height: calc(100vh - 50px);
    margin-top: 50px;
    position: relative;
}

.carousel {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-container {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

/* 个人照片样式 */
.about-section {
    padding: 4rem 2rem;
    background-color: var(--background-color);
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #1d1d1f;
    font-weight: 600;
}

.personal-info {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.info-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    color: #1d1d1f;
    font-weight: 400;
}

.info-item i {
    color: var(--primary-color);
    width: 20px;
}

.info-item strong {
    font-weight: 600;
}

.education {
    margin-top: 2rem;
    border-top: 1px solid #e5e5e5;
    padding-top: 1.5rem;
}

.education h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.education-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: grid;
    gap: 0.5rem;
}

.education-item .year {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.education-item .degree {
    font-weight: 500;
}

.education-item .school {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.9rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #1d1d1f;
    opacity: 0.9;
}

.about-text p:last-child {
    font-size: 1rem;
    opacity: 0.8;
}

.about-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.02);
}

/* AI对话界面样式 */
.chat-section {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.chat-container {
    background-color: var(--background-color);
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 700px;
}

.chat-history {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
    scroll-behavior: smooth;
}

.chat-message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
    padding: 1rem 1.5rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.message-content {
    max-width: 90%;
    padding: 1rem 1.5rem;
    position: relative;
    font-size: 1rem;
    line-height: 1.6;
}

.ai-message {
    background-color: rgb(247, 247, 248);
}

.ai-message .message-content {
    background-color: transparent;
}

.user-message {
    flex-direction: row-reverse;
    background-color: white;
}

.user-message .message-content {
    color: #1d1d1f;
    background-color: transparent;
    text-align: right;
}

/* 聊天输入框样式 */
.chat-input {
    border-top: 1px solid #e5e5e5;
    padding: 1rem 1.5rem;
    background-color: white;
}

.chat-input textarea {
    width: 100%;
    min-height: 24px;
    max-height: 200px;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    resize: none;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    background-color: #f7f7f8;
    transition: all 0.3s ease;
}

.chat-input textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
}

.input-actions {
    display: flex;
    gap: 1rem;
    padding: 0.5rem;
    justify-content: flex-end;
    align-items: center;
}

.input-actions button {
    background: none;
    border: none;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
}

.input-actions button:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
}

.send-btn {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-radius: 8px !important;
    padding: 0.5rem 1rem !important;
}

.send-btn:hover {
    opacity: 0.9;
}

.voice-btn.recording {
    color: #ff4444;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .nav-links {
        display: none;
    }

    .chat-section {
        padding: 1rem;
    }
}

/* 技能卡片样式 */
.skills-section {
    padding: 4rem 0;
    background-color: #f8f9fa;
}

.skills-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-card {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.skill-level {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    margin: 1rem 0;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

.skill-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.skill-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
    opacity: 0.8;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background-color: var(--primary-color);
}

/* 轮播按钮样式 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

.chat-message.loading .message-content {
    position: relative;
    padding-right: 3rem;
}

.chat-message.loading .message-content::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 页脚样式 */
.footer {
    background-color: #f8f9fa;
    padding: 4rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.footer-section h4 {
    color: #1d1d1f;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-section p {
    color: #1d1d1f;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    color: #1d1d1f;
    font-size: 1.5rem;
    transition: var(--transition);
    position: relative;
}

.social-link:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.social-link::after {
    content: attr(title);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    white-space: nowrap;
}

.social-link:hover::after {
    opacity: 1;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-nav a {
    color: #1d1d1f;
    text-decoration: none;
    transition: var(--transition);
}

.footer-nav a:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e5e5;
    text-align: center;
    color: #1d1d1f;
    font-size: 0.9rem;
}

/* AI对话界面头部样式 */
.chat-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: transparent;
    border-radius: 10px;
}

.deepseek-logo {
    height: 40px;
    width: auto;
}

.chat-header h3 {
    color: #1d1d1f;
    font-size: 1.2rem;
    font-weight: 500;
} 